package com.hstcs.creator;

import com.badlogic.ashley.core.Entity;
import com.badlogic.gdx.math.Rectangle;
import com.hstcs.components.BoundsComponent;
import com.hstcs.components.MovementComponent;
import com.hstcs.components.TransformComponent;
import com.hstcs.game.God;

public class AreaCreator implements EntityCreator {
	
	public static void create(Rectangle rect){
		Entity entity  = new Entity();
		
		TransformComponent position = new TransformComponent();
		BoundsComponent bc = new BoundsComponent();	
		bc.bounds.set(rect);
		
		position.distance = rect.width;
		position.pos.x = rect.x;
		position.pos.y = rect.y;
		position.pos.z = 10;
		
		entity.add(position);
		entity.add(bc);
		God.instance.engine.addEntity(entity);
	}

}
